<?php if(!defined('ROOT_PATH')) exit('Access Denied');?><dl class="Tabs">
<dt id="CommentsTabs"><a href="#tabCommentList" class="select">列表</a> <a href="#tabCommentCensor">审核</a></dt>
<dd id="tabCommentList" style="display: block; ">
<p class="operate">操作: 
<a href="#" onclick="checkAll('list-comment'); return false;">选择全部</a> , 
<a href="#" onclick="uncheckAll('list-comment'); return false;">全部不选</a>&nbsp;&nbsp;&nbsp;
选择项: <a href="#" onclick="if(confirm('确定删除?')){commentDelete();}return false;">删除</a>
</p>
<table class="list-table" id="list-comment">
<colgroup>
<col width="50">
                <col width="50">
<col width="50">
<col width="385">
                <col width="150">
<col width="150">
</colgroup>
<thead>
<tr>
<th class="radius-topleft"> </th>
<th>作者</th>
                    <th>头像</th>
<th>内容</th>
                    <th>IP</th>
<th class="radius-topright">时间</th>
</tr>
</thead>
<tbody>
            <?php if(is_array($commentsdata)) foreach($commentsdata AS $vlaue) { ?> 
<tr class="even" id="post-<?php echo $vlaue["id"];?>">
<td><input type="checkbox" value="<?php echo $vlaue["id"];?>" name="cid[]"></td>
<td><?php echo $vlaue["name"];?></td>
                    <td><img src="<?php echo $vlaue["head"];?>" width="30" height="30" /></td>
                    <td><?php echo ubb($vlaue["content"]);?></td>
<td><?php echo $vlaue["ip"];?></td>
<td><?php echo $vlaue["date"];?></td>
</tr>
<?php } ?>
			
</tbody>
</table>
</dd>
<dd id="tabCommentCensor" style="display: none; "></dd>
</dl>
<script>
Tabs(document.getElementById('CommentsTabs'), 'select', 0);

function commentDelete() {
$("#list-comment input:checked").each(function(){
$.post(
'/admin.php/Admin_Comments/del',
{'cid':$(this).val()},
function(response){
alert(response);
if(!response){
showMessage('删除成功！','tips');
ajaxLoad('/admin.php/Admin_Comments');
}
},
"json"
);
});

}
</script>